package com.maben.mybatis_plus.dictionary;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;


public enum Gender {
    男(1,"男"),
    女(2,"女");

    /**
     * 标记数据库存的值是code
     */
    @EnumValue
    private final int code;
    /**
     * 标注该字段要开启自定义序列化返回值
     */
    @JsonValue
    private final String desc;

    Gender(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }
}
